Skip to content

Key Bindings: modeless editor with inline editing and Wheel-of-Effects positions - #6836

Closed
heffneil wants to merge 1 commit into
xLightsSequencer:masterfrom
heffneil:keybindings-standalone-modeless
Closed

Key Bindings: modeless editor with inline editing and Wheel-of-Effects positions#6836
heffneil wants to merge 1 commit into
xLightsSequencer:masterfrom
heffneil:keybindings-standalone-modeless

Conversation

@heffneil

@heffneil heffneil commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What

Reworks the Key Bindings editor in place (File → Key bindings), keeping it where users already expect it.

This is a focused revival of the keybindings half of the closed #6672without the Preferences-treebook redesign that PR was closed over (too many conflicts / needed more design discussion). No Preferences pages are touched here.

Editor

  • Modeless — stays open while you keep working in Layout/Sequencer; reopening raises the existing window instead of stacking duplicates.
  • Friendly action names + a plain-language description for every binding.
  • Category / Scope / text filters. The Scope dropdown is built from the data, so it only offers scopes that actually occur in the selected category (no more picking a combination that yields an empty list).
  • Inline editing, no popup — the key is captured by pressing it, with Control / Alt / Shift / Raw Control checkboxes and a compact effect / preset / setting control.
  • Save / Cancel — edits are staged on a working copy of the KeyBindingMap and only written to the live map (and saved) on Save, so a mistake can be backed out.

Effects / Wheel of Effects

  • A Position column showing each effect's wheel clock slot, plus a live wheel preview.
  • Reorder by drag (with a native drop indicator) or Move Up / Move Down.
  • Both mirror EffectsGrid's actual rule — the first 18 enabled, Sequencer-scoped effect bindings — so an effect that is keyless ("needs a key", since SetKey("") disables a binding) or past the cut-off ("not on wheel") is called out rather than implying a slot it will never occupy.

Demo

See the demo video in the comments below.

Notes

  • The list uses wxDataViewListCtrl for native drag-reorder and fast scrolling. A trailing spacer column absorbs the control's last-column stretch, so the key columns keep their widths.
  • New sources are registered in xLights.cbp and Xlights.vcxproj(.filters); CMakeLists.txt already globs src-ui-wx/preferences and src-ui-wx/app-shell.
  • Mac-only modifier glyphs (⌘/⌥/⌃/⇧) stay behind the existing #ifdef __WXOSX__; Windows/Linux render Ctrl+/Alt+/Shift+.

Testing

  • macOS Debug build clean; exercised filters, inline key capture, modifier checkboxes, Save vs Cancel, add/remove, drag + Move Up/Down reordering, and the wheel/Position behaviour around the 18-slot limit.

iPad parity

Desktop-only (src-ui-wx/). Keyboard shortcuts have no iPad counterpart (no hardware-keyboard binding editor there), so this is a capture-in-plans item rather than a port.

@heffneil

heffneil commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Demo video below. I had to lower the resolution to get it under 10mb. Let me know if anything is unclear.

demo-keybindings-under10mb.mp4

…s positions

Reworks the Key Bindings editor in place (File > Key bindings), keeping it where
users already expect it rather than moving it into Preferences.

- Modeless window, so it stays open while you keep working in Layout/Sequencer;
  reopening raises the existing instance instead of stacking duplicates.
- Friendly action names and a plain-language description per binding, plus
  Category / Scope / text filters. The Scope dropdown is built from the data, so
  it only offers scopes that actually occur in the selected category.
- Inline editing on the right (no modal popup): the key is captured by pressing
  it, with Control / Alt / Shift / Raw Control checkboxes, and a compact
  effect / preset / setting control.
- Save / Cancel: edits are staged on a working copy of the KeyBindingMap and
  only written to the live map (and saved) on Save, so a mistake can be backed
  out with Cancel.
- Effects view: a Position column showing each effect's Wheel-of-Effects clock
  slot, a live wheel preview, and reordering by drag (with a drop indicator) or
  Move Up / Move Down. Both mirror EffectsGrid's actual rule - the first 18
  enabled, Sequencer-scoped effect bindings - so effects that are keyless
  ("needs a key") or past the cut-off ("not on wheel") are called out instead of
  silently implying a slot they will never occupy.

The list uses wxDataViewListCtrl for native drag-reorder and fast scrolling; a
trailing spacer column absorbs the control's last-column stretch so the key
columns keep their widths.

New sources are registered in xLights.cbp and Xlights.vcxproj(.filters);
CMakeLists already globs src-ui-wx/preferences and src-ui-wx/app-shell.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@heffneil
heffneil force-pushed the keybindings-standalone-modeless branch from a9489b2 to 731a31a Compare August 4, 2026 11:31
@heffneil
heffneil marked this pull request as ready for review August 4, 2026 18:41
@dkulp

dkulp commented Aug 4, 2026

Copy link
Copy Markdown
Member

Personally, I want to completely decouple the "Wheel" from the keybindings. The wheel should have its own customizer and it should not be dependent on anything key related.

@cybercop23

Copy link
Copy Markdown
Collaborator

Should we port the Effects from KeyBindings and use them in this "fashion"? Otherwise, we'll also need Effect settings for the wheel since "some" do actually use that, which is why I expanded the use to 4 "pages".

@heffneil

heffneil commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

ok thats good feedback - not sure how that works I guess Wheel and then drag and drop or something or sort position?

@heffneil

Copy link
Copy Markdown
Contributor Author

Closing this rather than letting it sit — the feedback here is clear and this PR is the wrong shape for it.

@dkulp's point stands: the Wheel should have its own customizer and shouldn't be coupled to key bindings at all. And @cybercop23 is right that a proper Wheel editor needs effect settings, not just effect names, which is more than this PR models.

Bundling the two is what made this hard to review — the modeless key-binding editor and the Wheel-of-Effects work are independent features sharing a dialog only for historical reasons. Rather than argue the bundle, I'll split it:

  • the modeless editor, inline key editing and enriched binding descriptions can come back as a focused PR that touches only key bindings
  • the Wheel deserves its own customizer, decoupled as suggested, with settings support designed in from the start

The branch is preserved, so nothing is lost. Thanks both for the review — it saved this from becoming a much bigger mess later.

@heffneil heffneil closed this Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants